package com.loveshare.log.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.loveshare.log.bean.UservisitlogInfo;
import com.loveshare.log.dao.LogDao;

/**
 * 
 * ClassName: LogServiceImpl 
 * @Description: 日志业务接口实现
 * @author 爱分享
 * @date 2017年12月20日
 */
@Service
public class LogServiceImpl implements LogService{

	@Autowired
	private LogDao logDao;
	
	public boolean addArticleInfo(String ip, String ipregion, int indexType) {
		try {
			logDao.addArticleInfo(ip, ipregion,indexType);
		} catch (Exception e) {
			System.out.println(e);
		}
		return true;
	}

	public long getArticleInfoCount() {
		return logDao.getArticleInfoCount();
	}

	public UservisitlogInfo getUservisitlogInfo(String ip) {
		return logDao.getUservisitlogInfo(ip);
	}


}
